package com.css.order.client;

import com.css.order.VO.ResultVO;
import com.css.order.dataobject.ProductInfo;
import com.css.order.dto.CartDTO;
import com.css.order.util.ResultVOUtil;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * <p>
 * -
 * </p>
 *
 * @author css
 * @since 2019/12/27
 */
@FeignClient("product")
public interface ProductClient {
    @GetMapping("/msg")
    String msg();

    @PostMapping("/product/listForOrder")
    List<ProductInfo> listForOrder(@RequestBody List<String> orderIds);

    @PostMapping("/product/decreaseStock")
    ResultVO decreaseStock(@RequestBody List<CartDTO> cartDTOS);
}
